package com.xy.gateway.control.check.request;

import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

public abstract class PaymentReqCheckAbstract implements PaymentReqCheck {
	protected HttpServletRequest req;
	protected String sid;
	protected String reqtype;
	protected String paytype;
	public PaymentReqCheckAbstract(HttpServletRequest req) {
		this.req = req;
		 sid = req.getParameter("sid");
		 reqtype = req.getParameter("reqtype");
		 paytype = req.getParameter("paytype");
	}

	protected Map<String, String> getParaValuesMap() {

		Map<String, String> m = new HashMap<String, String>();
		return m;
	}

	public boolean checkInput() {
		boolean isValid = false;
		
		if (sid != null && !sid.equals("") && reqtype != null
				&& !reqtype.equals("") && paytype != null
				&& !paytype.equals(""))
			isValid = true;
		return isValid;
	}

	public boolean checkStatus() {
		// TODO Auto-generated method stub
		return true;
	}
}
